package com.jbit.dm212.controller;

import com.jbit.dm212.common.ResponseResult;
import com.jbit.dm212.common.ResponseResultUtils;
import com.jbit.dm212.entity.dto.DmAreaDTO;
import com.jbit.dm212.service.DmAreaService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/base/api/p/area")
public class BaseApiAreaController {
    @Resource
    private DmAreaService dmAreaService;
    @PostMapping("/queryCityList")
    public ResponseResult<List<DmAreaDTO>> queryCityList(){
        List<DmAreaDTO> list = dmAreaService.getAreas();
        return ResponseResultUtils.sendSuccess(list);
    }
}
